package com.test;

public class Student extends User implements Clean {

    /* 学号 */
    private int studentNumber;

    /* 班级 */
    private Grade grade;

    /* 宿舍号 */
    private int dormitoryNumber;

    public Student() {
    }

    public Student(String name,
                   int age,
                   int studentNumber,
                   Grade grade,
                   int dormitoryNumber) {
        super(name, age);
        this.studentNumber = studentNumber;
        this.grade = grade;
        this.dormitoryNumber = dormitoryNumber;
    }

    public int getStudentNumber() {
        return studentNumber;
    }

    public void setStudentNumber(int studentNumber) {
        this.studentNumber = studentNumber;
    }

    public Grade getGrade() {
        return grade;
    }

    public void setGrade(Grade grade) {
        this.grade = grade;
    }

    public int getDormitoryNumber() {
        return dormitoryNumber;
    }

    public void setDormitoryNumber(int dormitoryNumber) {
        this.dormitoryNumber = dormitoryNumber;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + getName() + '\'' +
                ", age=" + getAge() +
                ", studentNumber=" + studentNumber +
                ", grade=" + grade +
                ", dormitoryNumber=" + dormitoryNumber +
                '}';
    }

    /* 手动重写 */
    @Override
    void playBall() {
        System.out.println("打篮球、踢足球、打羽毛球");
    }

    @Override
    public void classRoomCleaning(String classRoom) {
        System.out.println(getName() + "负责" + classRoom + "的大扫除");
    }

    @Override
    public void dormitoryCleaning() {
        System.out.println(getName() + "负责" + dormitoryNumber + "宿舍的大扫除");
    }

    @Override
    void code(String app) {
        System.out.println("学生使用" + app + "编写代码");
    }
}
